package utilcache

import (
	"git.sr.ht/~mil/mobroute/src/logger"
	"os"
)

func CacheDir(subFolder string) string {
	dir := os.Getenv("HOME") + "/.cache/mobroute" + "/" + subFolder
	if err := os.MkdirAll(dir, os.ModePerm); err != nil {
		logger.Fatal(err)
	}
	return dir
}
